<!--职位管理添加-->
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!-- 导入头部top文件 start -->
<%@include file="../common/header.jsp" %>
<body>
<form class="form-horizontal m-t" id="mainForm" method="post">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox-title">
                    <h5>职位管理信息</h5>
                </div>
                <div class="ibox-content">
                    <ul class="nav nav-tabs">
                        <li class="active"><a data-toggle="tab" href="#tab-1"> 基本信息</a>
                        </li>
                        <li class=""><a data-toggle="tab" href="#tab-2">职位描述</a>
                        </li>
                    </ul>
                    <div class="tab-content" style="margin-top: 10px;">
                        <div id="tab-1" class="tab-pane active">

                            <input type="hidden" id="id" name="id" value="${model.id}"/>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">选择发布渠道：</label>

                                <div class="col-sm-8">
                                    <input id="channelIds" name="channelIds" type="hidden" class="form-control"
                                           value="${model.channelIds}">
                                    <input id="channelNames" type="text" class="form-control"
                                           value="${model.channelNames}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">职位名称：</label>

                                <div class="col-sm-8">
                                    <input id="name" name="name" type="text" value="${model.name}" class="form-control"
                                           required="" aria-required="true">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">职位关键字：</label>

                                <div class="col-sm-8">
                                    <input id="keyword" name="keyword" type="text" value="${model.keyword}"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">职位类别：</label>

                                <div class="col-sm-8">
                                    <input id="jobType" name="jobType" type="hidden" value="${model.jobType}"
                                           class="form-control">
                                    <input id="jobTypeName" name="jobTypeName" type="text" value="${model.jobTypeName}"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">最低学历：</label>

                                <div class="col-sm-8">
                                    <input id="education" name="education" type="hidden" value="${model.education}"
                                           class="form-control">
                                    <input id="educationName" name="educationName" type="text"
                                           value="${model.educationName}"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">最低薪资：*</label>

                                <div class="col-sm-7" style="padding-right: 10px">
                                    <input id="salaryMin" name="salaryMin" type="number" class="form-control"
                                           value="${model.salaryMin}">
                                </div>
                                <div class="col-sm-1" style="line-height: 34px;height: 34px;padding: 0">
                                    K
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">最高薪资：*</label>

                                <div class="col-sm-7" style="padding-right: 10px">
                                    <input id="salaryMax" name="salaryMax" type="number" class="form-control"
                                           value="${model.salaryMax}">
                                </div>
                                <div class="col-sm-1" style="line-height: 34px;height: 34px;padding: 0">
                                    K
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">招聘人数：</label>

                                <div class="col-sm-8">
                                    <input id="personCount" name="personCount" type="number"
                                           value="${model.personCount}"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">发布城市：</label>

                                <div class="col-sm-8">
                                    <input id="city" name="city" type="hidden" value="${model.city}"
                                           class="form-control">
                                    <input id="cityName" name="cityName" type="text" value="${model.cityName}"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">上班地址：</label>

                                <div class="col-sm-8">
                                    <input id="address" name="address" type="hidden" value="${model.address}"
                                           class="form-control">
                                    <input id="addressName" name="addressName" type="text" value="${model.addressName}"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">工作经验：</label>

                                <div class="col-sm-8">
                                    <input id="workExperience" name="workExperience" type="hidden"
                                           value="${model.workExperience}"
                                           class="form-control">
                                    <input id="workExperienceName" name="workExperienceName" type="text"
                                           value="${model.workExperienceName}"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">状态：</label>

                                <div class="col-sm-8">
                                    <select id="status" name="status">
                                        <option value="2">发布
                                        </option>
                                        <option value="3">下线
                                        </option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div id="tab-2" class="tab-pane">
                            <div class="form-group">
                                <textarea id="content" name="content"
                                >${model.content}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                <button class="btn btn-primary" type="submit" id="idSubmit">提交</button>
                            </div>
                        </div>
                    </div>
                    <script src="/static/js/jquery.min.js?v=2.1.4"></script>
                    <script src="/static/js/bootstrap.min.js?v=3.3.5"></script>
                    <script src="/static/js/content.min.js?v=1.0.0"></script>
                    <script src="/static/js/plugins/validate/jquery.validate.min.js"></script>
                    <script src="/static/js/plugins/validate/messages_zh.min.js"></script>
                    <script src="/static/js/plugins/ueditor/ueditor.config.js"></script>
                    <script src="/static/js/plugins/ueditor/ueditor.all.min.js"></script>
                    <script src="/static/js/plugins/dialog/dialog-min.js"></script>
                    <script src="/static/js/plugins/dialog/dialog-plus-min.js"></script>
                    <script src="/static/js/cateDialog.js"></script>
                </div>
            </div>
        </div>
    </div>
</form>
<script type="text/javascript">
    var ue = UE.getEditor('content', {initialFrameHeight: 600});
    var id = "${model.id}";
    var status = "${status}";
    var from = mainForm;
    $("#jobTypeName").click(function () {
        var d = dialog({
            id: "dialog",
            title: '选择职位类别',
            url: '/job/dialog',
            ok: function () {
                var iframeWin = this.iframeNode.contentWindow;
                from.jobType.value = iframeWin.selectId;
                from.jobTypeName.value = iframeWin.selectName;
            },
            width: 520,
            height: 200
        }).show();
    });
    $("#cityName").click(function () {
        var d = dialog({
            id: "dialog",
            title: '选择城市',
            url: '/user/company/address/dialog',
            ok: function () {
                var iframeWin = this.iframeNode.contentWindow;
                from.city.value = iframeWin.selectId;
                from.cityName.value = iframeWin.selectName;
            },
            width: 520,
            height: 200
        }).show();
    });
    $("#channelNames").click(function (e) {
        dialog({
            id: "dialog",
            title: '选择渠道',
            url: '/channel/dialog',
            okValue: "确认",
            ok: function () {
                if (this.iframeNode.contentWindow.dialogView) {
                    var dialogView = this.iframeNode.contentWindow.dialogView;
                    var list = dialogView.selectCheckData();
                    if (dialogView.data) {
                        var allName = [];
                        var allId = [];
                        for (var i = 0; i < list.length; i++) {
                            var key = list[i];
                            allId.push(dialogView.data[key].id);
                            allName.push(dialogView.data[key].name);
                        }
                    }
                    $("#channelIds").val(allId.join(","));
                    $("#channelNames").val(allName.join(";"));
                }

            },
            width: 500
        }).show();
    });
</script>
<script src="/static/js/admin/jobInfo.js"></script>
</body>
</html>
